package magicloan.auctionpocket.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by hechao on 2018/2/1.
 */

public class VpFragmentPagerAdapter extends FragmentPagerAdapter {

    private List<Fragment> list;
    public VpFragmentPagerAdapter(FragmentManager fm, List<Fragment> mContents) {
        super(fm);
        this.list = mContents;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

}
